package com.cqan.util.http;

/**
 * http 请求返回码
 * @author slaton
 *
 */
public class HttpStatus {

	 /** <tt> 100（继续） 请求者应当继续提出请求。 服务器返回此代码表示已收到请求的第一部分，正在等待其余部分。  </tt> (HTTP/1.1 - RFC 2616) */
    public static final int CONTINUE = 100;
    
    /** <tt> 101 （切换协议） 请求者已要求服务器切换协议，服务器已确认并准备切换。</tt> (HTTP/1.1 - RFC 2616)*/
    public static final int SWITCHING_PROTOCOLS = 101;
    
    /** <tt>102 Processing</tt> (WebDAV - RFC 2518) */
    public static final int PROCESSING = 102;

    // --- 2xx Success ---

    /** <tt>200 服务器已成功处理了请求。 通常，这表示服务器提供了请求的网页。</tt> (HTTP/1.0 - RFC 1945) */
    public static final int OK = 200;
    
    /** <tt>201  请求成功并且服务器创建了新的资源。</tt> (HTTP/1.0 - RFC 1945) */
    public static final int CREATED = 201;
    
    /** <tt>202 （已接受）  服务器已接受请求，但尚未处理。</tt> (HTTP/1.0 - RFC 1945) */
    public static final int ACCEPTED = 202;
    
    /** <tt>203 （非授权信息）  服务器已成功处理了请求，但返回的信息可能来自另一来源。</tt> (HTTP/1.1 - RFC 2616) */
    public static final int NON_AUTHORITATIVE_INFORMATION = 203;
    
    /** <tt>204 （无内容）  服务器成功处理了请求，但没有返回任何内容。</tt> (HTTP/1.0 - RFC 1945) */
    public static final int NO_CONTENT = 204;
    
    /** <tt>205（重置内容） 服务器成功处理了请求，但没有返回任何内容。</tt> (HTTP/1.1 - RFC 2616) */
    public static final int RESET_CONTENT = 205;
    
    /** <tt>206 （部分内容）  服务器成功处理了部分 GET 请求。</tt> (HTTP/1.1 - RFC 2616) */
    public static final int PARTIAL_CONTENT = 206;
    /** 
     * <tt>207 Multi-Status</tt> (WebDAV - RFC 2518) or <tt>207 Partial Update
     * OK</tt> (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
     */
    public static final int MULTI_STATUS = 207;

    // --- 3xx Redirection ---

    /** <tt>300 Mutliple Choices</tt> (HTTP/1.1 - RFC 2616) */
    public static final int MULTIPLE_CHOICES = 300;
    
    /** <tt>301 Moved Permanently</tt> (HTTP/1.0 - RFC 1945) */
    public static final int MOVED_PERMANENTLY = 301;
    
    /** <tt>302 Moved Temporarily</tt> (Sometimes <tt>Found</tt>) (HTTP/1.0 - RFC 1945) */
    public static final int MOVED_TEMPORARILY = 302;
    
    /** <tt>303 See Other</tt> (HTTP/1.1 - RFC 2616) */
    public static final int SEE_OTHER = 303;
    
    /** <tt>304 Not Modified</tt> (HTTP/1.0 - RFC 1945) */
    public static final int NOT_MODIFIED = 304;
    
    /** <tt>305 Use Proxy</tt> (HTTP/1.1 - RFC 2616) */
    public static final int USE_PROXY = 305;
    
    /** <tt>307 Temporary Redirect</tt> (HTTP/1.1 - RFC 2616) */
    public static final int TEMPORARY_REDIRECT = 307;

    
    
    // --- 4xx Client Error ---

    /** <tt>400 （错误请求） 服务器不理解请求的语法。</tt> (HTTP/1.1 - RFC 2616) */
    public static final int BAD_REQUEST = 400;
    
    /** <tt>401 （未授权） 请求要求身份验证。 对于需要登录的网页，服务器可能返回此响应。</tt> (HTTP/1.0 - RFC 1945) */
    public static final int UNAUTHORIZED = 401;
    
    /** <tt>402 Payment Required</tt> (HTTP/1.1 - RFC 2616) */
    public static final int PAYMENT_REQUIRED = 402;
    
    /** <tt>403 Forbidden</tt> (HTTP/1.0 - RFC 1945) */
    public static final int FORBIDDEN = 403;
    
    /** <tt>404 Not Found</tt> (HTTP/1.0 - RFC 1945) */
    public static final int NOT_FOUND = 404;
    
    /** <tt>405 Method Not Allowed</tt> (HTTP/1.1 - RFC 2616) */
    public static final int METHOD_NOT_ALLOWED = 405;
    
    /** <tt>406 Not Acceptable</tt> (HTTP/1.1 - RFC 2616) */
    public static final int NOT_ACCEPTABLE = 406;
    
    /** <tt>407 Proxy Authentication Required</tt> (HTTP/1.1 - RFC 2616)*/
    public static final int PROXY_AUTHENTICATION_REQUIRED = 407;
    
    /** <tt>408 Request Timeout</tt> (HTTP/1.1 - RFC 2616) */
    public static final int REQUEST_TIMEOUT = 408;
    
    /** <tt>409 Conflict</tt> (HTTP/1.1 - RFC 2616) */
    public static final int CONFLICT = 409;
    
    /** <tt>410 Gone</tt> (HTTP/1.1 - RFC 2616) */
    public static final int GONE = 410;
    
    /** <tt>411 Length Required</tt> (HTTP/1.1 - RFC 2616) */
    public static final int LENGTH_REQUIRED = 411;
    
    /** <tt>412 Precondition Failed</tt> (HTTP/1.1 - RFC 2616) */
    public static final int PRECONDITION_FAILED = 412;
    
    /** <tt>413 Request Entity Too Large</tt> (HTTP/1.1 - RFC 2616) */
    public static final int REQUEST_TOO_LONG = 413;
    
    /** <tt>414 Request-URI Too Long</tt> (HTTP/1.1 - RFC 2616) */
    public static final int REQUEST_URI_TOO_LONG = 414;
    
    /** <tt>415 Unsupported Media Type</tt> (HTTP/1.1 - RFC 2616) */
    public static final int UNSUPPORTED_MEDIA_TYPE = 415;
    
    /** <tt>416 Requested Range Not Satisfiable</tt> (HTTP/1.1 - RFC 2616) */
    public static final int REQUESTED_RANGE_NOT_SATISFIABLE = 416;
    
    /** <tt>417 Expectation Failed</tt> (HTTP/1.1 - RFC 2616) */
    public static final int EXPECTATION_FAILED = 417;
    
    /**
	 * {@code 426 Upgrade Required}.
	 * @see <a href="http://tools.ietf.org/html/rfc2817#section-6">Upgrading to TLS Within HTTP/1.1</a>
	 */
    public static final int UPGRADE_REQUIRED = 426;

	// --- 5xx Server Error ---

	/**
	 * {@code 500 Internal Server Error}.
	 * @see <a href="http://tools.ietf.org/html/rfc2616#section-10.5.1">HTTP/1.1</a>
	 */
    public static final int INTERNAL_SERVER_ERROR = 500;
	/**
	 * {@code 501 Not Implemented}.
	 * @see <a href="http://tools.ietf.org/html/rfc2616#section-10.5.2">HTTP/1.1</a>
	 */
    public static final int NOT_IMPLEMENTED = 501;
	/**
	 * {@code 502 Bad Gateway}.
	 * @see <a href="http://tools.ietf.org/html/rfc2616#section-10.5.3">HTTP/1.1</a>
	 */
    public static final int BAD_GATEWAY = 502;
	/**
	 * {@code 503 Service Unavailable}.
	 * @see <a href="http://tools.ietf.org/html/rfc2616#section-10.5.4">HTTP/1.1</a>
	 */
    public static final int SERVICE_UNAVAILABLE = 503;
	/**
	 * {@code 504 Gateway Timeout}.
	 * @see <a href="http://tools.ietf.org/html/rfc2616#section-10.5.5">HTTP/1.1</a>
	 */
    public static final int GATEWAY_TIMEOUT = 504;
	/**
	 * {@code 505 HTTP Version Not Supported}.
	 * @see <a href="http://tools.ietf.org/html/rfc2616#section-10.5.6">HTTP/1.1</a>
	 */
    public static final int HTTP_VERSION_NOT_SUPPORTED = 505;
	/**
	 * {@code 506 Variant Also Negotiates}
	 * @see <a href="http://tools.ietf.org/html/rfc2295#section-8.1">Transparent Content Negotiation</a>
	 */
    public static final int VARIANT_ALSO_NEGOTIATES = 506;
	/**
	 * {@code 507 Insufficient Storage}
	 * @see <a href="http://tools.ietf.org/html/rfc4918#section-11.5">WebDAV</a>
	 */
    public static final int INSUFFICIENT_STORAGE = 507;
	/**
	 * {@code 508 Loop Detected}
	 * @see <a href="http://tools.ietf.org/html/draft-ietf-webdav-bind-27#section-7.2">WebDAV Binding Extensions</a>
 	 */
    public static final int LOOP_DETECTED = 508;
	/**
	 * {@code 510 Not Extended}
	 * @see <a href="http://tools.ietf.org/html/rfc2774#section-7">HTTP Extension Framework</a>
	 */
    public static final int NOT_EXTENDED = 510;
    
    
}
